- Box = new Rectangle((int)(Position.X - BoxDimensions.X), (int)(Position.Y - BoxDimensions.X), (int)(BoxDimensions.X + BoxDimensions.W), (int)(BoxDimensions.Y + BoxDimensions.Z));
+ Box = new Rectangle((int)(Position.X - BoxDimensions.X), (int)(Position.Y - BoxDimensions.X), (int)(BoxDimensions.X + BoxDimensions.X + BoxDimensions.W), (int)(BoxDimensions.Y + BoxDimensions.Y + BoxDimensions.Z));
Angle = (float)Math.Atan2(Velocity.Y, Velocity.X);
}
public virtual void Draw(SpriteBatch spriteBatch)
{
Angle = (float)Math.Atan2(Velocity.Y, Velocity.X);
}
public virtual void Draw(SpriteBatch spriteBatch)
{
child.Draw(spriteBatch);
}
spriteBatch.Draw(Texture, Position, null, Color, Angle, Origin, 1f, SpriteEffects.None, 0f);
child.Draw(spriteBatch);
}
spriteBatch.Draw(Texture, Position, null, Color, Angle, Origin, 1f, SpriteEffects.None, 0f);
- spriteBatch.Draw(BoxTexture, Box, new Color(255, 0, 255, 25));
+ //spriteBatch.Draw(BoxTexture, Box, new Color(255, 0, 255, 25));